package com.hjb.service.impl.user;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hjb.service.common.HolidayService;
import com.hjb.service.config.constant.Constants;
import com.hjb.service.domain.product.Product;
import com.hjb.service.domain.product.SiteUserBuy;
import com.hjb.service.domain.recharge.SiteUserRecharge;
import com.hjb.service.domain.siteuser.SiteUserAccountLog;
import com.hjb.service.domain.siteuser.SiteUserFixed;
import com.hjb.service.domain.siteuser.SiteUserFixedExample;
import com.hjb.service.domain.withdraw.PayCashWithdraw;
import com.hjb.service.mapper.PayCashWithdrawMapper;
import com.hjb.service.mapper.ProductMapper;
import com.hjb.service.mapper.SiteUserAccountLogMapper;
import com.hjb.service.mapper.SiteUserAccountMapper;
import com.hjb.service.mapper.SiteUserFixedMapper;
import com.hjb.service.product.SiteUserBuyService;
import com.hjb.service.siteuseraccount.SiteUserBankcardService;
import com.hjb.service.user.SiteSysAccountService;
import com.hjb.service.user.SiteUserAccountService;
import com.hjb.service.user.SiteUserFixedService;
import com.hjb.service.utils.HJBUT;
import com.hjb.service.utils.TradeDateUtil;

/**
 * 定期 接口业务实现类
 * @author zhangxl
 * @date 2017-08-09
 * @version 1.0
 */
@Service
public class SiteUserFixedServiceImpl implements SiteUserFixedService{

	private Logger log = LoggerFactory.getLogger(getClass());
	
	@Autowired
	private SiteUserFixedMapper siteUserFixedMapper;
	@Autowired
	private HolidayService holidayService;
	@Autowired
	private PayCashWithdrawMapper payCashWithdrawMapper;
	@Autowired
	private SiteUserAccountService siteUserAccountService;
	@Autowired
	private SiteUserAccountMapper siteUserAccountMapper;
	@Autowired
	private ProductMapper productMapper;
	@Autowired
	private SiteUserAccountLogMapper siteUserAccountLogMapper;
	@Autowired
	private SiteUserBuyService siteUserBuyService;
	@Autowired
	private SiteUserBankcardService siteUserBankcardService;
	@Autowired
	private SiteSysAccountService siteSysAccountService;
	
	@Override
	public List<Map<String, Object>> queryUserFixedList(
			Map<String, Object> params) {
		return siteUserFixedMapper.queryUserFixedList(params);
	}

	@Override
	@Transactional
	public void accountFixedExpireWork() {
		try {
			log.info("定期到期处理任务开始：........................"+HJBUT.currentTime());
			SiteUserFixedExample userfixedExample = new SiteUserFixedExample();
			userfixedExample.createCriteria().andStatusEqualTo(Constants.COMMON_STATUS_0).andCashReturnDateEqualTo(HJBUT.currentDate());
			List<SiteUserFixed> userFixedList = siteUserFixedMapper.selectByExample(userfixedExample);
			log.info("定期到期处理任务数："+userFixedList.size());
			for(SiteUserFixed userFixed : userFixedList){
				log.info("定期回款任务明细：user_id："+userFixed.getUserId()+",回款方式："+userFixed.getReturnType()+
						",投资日期："+userFixed.getApplyDate()+"投资金额:"+userFixed.getAmount());
				log.info("待收利息："+userFixed.getExpectInterest()+",平台加息:"+userFixed.getExpectAddInterest()+",加息券加息:"+userFixed.getExpectCoupon()
						+",红包："+userFixed.getExpectTip());
				
				//更新定期待收状态为已还款
				SiteUserFixed updateUserFixed = new SiteUserFixed();
				updateUserFixed.setId(userFixed.getId());
				updateUserFixed.setStatus(Constants.COMMON_STATUS_1);
				updateUserFixed.setUpdateTime(new Date());
				siteUserFixedMapper.updateByPrimaryKeySelective(updateUserFixed);
				
				BigDecimal amount = userFixed.getAmount();
				BigDecimal expectInterest = userFixed.getExpectInterest();
				BigDecimal expectAddInterest = userFixed.getExpectAddInterest();
				BigDecimal expectCoupon = userFixed.getExpectCoupon();
				BigDecimal expectTip = userFixed.getExpectTip();
				BigDecimal totalAmount = amount.add(expectInterest).add(expectAddInterest).add(expectCoupon).add(expectTip);
				BigDecimal totalIncome = expectInterest.add(expectAddInterest).add(expectCoupon).add(expectTip);
				
				long timeMillis = System.currentTimeMillis();
				String orderNo = String.valueOf(timeMillis)+userFixed.getUserId();
				
				Product product = new Product();
				product.setProductId(userFixed.getProductId());
				product = productMapper.selectOne(product);
				
				String desc = "定期回款任务明细：user_id："+userFixed.getUserId()+",回款方式："+userFixed.getReturnType()+
						",投资日期："+userFixed.getApplyDate()+"投资金额:"+userFixed.getAmount()+",定期id:"+userFixed.getOrderNo();
				String inMsg = "";
				
				inMsg = "定期本金回款:"+amount+",定期order_id："+userFixed.getOrderNo();
				log.info(inMsg);
				siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10003, amount, BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_10, 
						userFixed.getUserId(), Constants.SYS_ACCOUNT_10003,
						"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
				
				//平台营收账户10005记账
				if(expectInterest.compareTo(BigDecimal.ZERO) >0){
					inMsg = "收益:"+expectInterest;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10005, expectInterest, BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_9, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10005,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
				}
				
				//平台营销账户记账
				if(expectAddInterest.compareTo(BigDecimal.ZERO) >0){
					inMsg = "平台加息收益:"+expectAddInterest;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10006, expectAddInterest, BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_9, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10006,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
				}
				//平台营销账户记账
				if(expectCoupon.compareTo(BigDecimal.ZERO) >0){
					inMsg = "加息券收益:"+expectCoupon;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10006, expectCoupon, BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_9, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10006,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
				}
				//平台营销账户记账
				if(expectTip.compareTo(BigDecimal.ZERO) >0){
					inMsg = "红包收益:"+expectTip;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10006, expectTip, BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_9, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10006,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
				}
				
				//回款投资定期7天
				if(userFixed.getReturnType().equals(Constants.RETURN_TYPE_21)){
					
					//更新定期信息
					Map<String,Object> params = new HashMap<String, Object>();
					params.put("userId", userFixed.getUserId());
					params.put("totalAmount", totalAmount);
					params.put("amount", amount);
					params.put("expectInterest", expectInterest);
					params.put("expectAddInterest", expectAddInterest);
					params.put("expectCoupon", expectCoupon);
					params.put("expectTip", expectTip);
					params.put("totalIncome", totalIncome);
					params.put("frozenAccount", BigDecimal.ZERO);
					siteUserAccountMapper.updateAccountByFixed(params);
					
					//查询定期7天产品
					Product productFixed = new Product();
					productFixed.setType(Constants.PRODUCT_TYPE_2);
					productFixed.setProductTime(7);
					productFixed.setStauts(1);
					productFixed = productMapper.selectOne(productFixed);
					
					BigDecimal rate = productFixed.getRate();
					if(productFixed.getAddRate() != null){
						rate = rate.add(productFixed.getAddRate());
					}
					
					//保存订单
					SiteUserBuy siteUserBuy = new SiteUserBuy();
					siteUserBuy.setOrderNo(orderNo);
					siteUserBuy.setUserId(userFixed.getUserId());
					siteUserBuy.setAmount(totalAmount);
					siteUserBuy.setProductId(productFixed.getProductId());
					siteUserBuy.setPayType(Constants.PAY_TYPE_5);
					siteUserBuy.setApplyTime(new Date());
					siteUserBuy.setApplyDate(HJBUT.getCurrentDate());
					siteUserBuy.setStatus(Constants.COMMON_STATUS_0);
					siteUserBuy.setTerminalType(Constants.TERMINAL_TYPE_5);
					siteUserBuy.setRate(rate);
					siteUserBuy.setProductType(Constants.PRODUCT_TYPE_2);
					siteUserBuy.setReturnType(Constants.RETURN_TYPE_21);
					siteUserBuy.setInterestDate(HJBUT.currentDate());
					siteUserBuy.setCashReturnDate(HJBUT.currentDate(productFixed.getProductTime()));
					siteUserBuy.setChangeNo(userFixed.getOrderNo());
					siteUserBuyService.insertSiteUserBuy(siteUserBuy);
					
					String info = product.getProductName()+"到期回款资金投资"+productFixed.getProductName()+"（项目本金"+amount+"、项目利息"+expectInterest+"、平台加息"+expectAddInterest
							+"、加息券收益"+expectCoupon+"、红包返现金额"+expectTip+"）";
					
					SiteUserAccountLog userAccountLog = new SiteUserAccountLog();
					userAccountLog.setUserId(userFixed.getUserId());
					userAccountLog.setAcctType(Constants.ACCOUNT_LOG_TYPE_5);
					userAccountLog.setCreateTime(new Date());
					userAccountLog.setInAccount(userFixed.getUserId());
					userAccountLog.setOutAccount(userFixed.getUserId());
					userAccountLog.setAmount(totalAmount);
					userAccountLog.setStatus(Constants.COMMON_STATUS_1);
					userAccountLog.setOrderId(orderNo);
					userAccountLog.setCurrnetOrder(null);
					userAccountLog.setFixedOrder(userFixed.getOrderNo());
					userAccountLog.setInfo(info);
					userAccountLog.setInMsg("定期");
					userAccountLog.setOutMsg("定期");
					siteUserAccountLogMapper.insertSelective(userAccountLog);
					
					//系统定期账户10003更新
					inMsg = "定期本金回款复投:"+amount+",回款定期order_id："+userFixed.getOrderNo()+"，复投定期7天："+orderNo+",复投金额："+totalAmount;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10003, totalAmount.negate(), BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_5, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10003,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
					
					//生成定期订单
					SiteUserRecharge userRecharge = new SiteUserRecharge();
					userRecharge.setUserId(userFixed.getUserId());
					userRecharge.setOrderId(siteUserBuy.getOrderNo());
					userRecharge.setStatus(Constants.COMMON_STATUS_2);
					userRecharge.setRetMsgConf("定期转定期支付成功！");
					userRecharge.setReplyTime(new Date());
					
					//支付成功，处理订单
					siteUserBuyService.rechargeNotify(userRecharge);
				}
				
				//回款投资定期28天
				if(userFixed.getReturnType().equals(Constants.RETURN_TYPE_22)){
					
					//更新定期信息
					Map<String,Object> params = new HashMap<String, Object>();
					params.put("userId", userFixed.getUserId());
					params.put("totalAmount", totalAmount);
					params.put("amount", amount);
					params.put("expectInterest", expectInterest);
					params.put("expectAddInterest", expectAddInterest);
					params.put("expectCoupon", expectCoupon);
					params.put("expectTip", expectTip);
					params.put("totalIncome", totalIncome);
					params.put("frozenAccount", BigDecimal.ZERO);
					siteUserAccountMapper.updateAccountByFixed(params);
					
					//查询定期28天产品
					Product productFixed = new Product();
					productFixed.setType(Constants.PRODUCT_TYPE_2);
					productFixed.setProductTime(28);
					productFixed.setStauts(1);
					productFixed = productMapper.selectOne(productFixed);
					
					BigDecimal rate = productFixed.getRate();
					if(productFixed.getAddRate() != null){
						rate = rate.add(productFixed.getAddRate());
					}
					 
					//保存订单
					SiteUserBuy siteUserBuy = new SiteUserBuy();
					siteUserBuy.setOrderNo(orderNo);
					siteUserBuy.setUserId(userFixed.getUserId());
					siteUserBuy.setAmount(totalAmount);
					siteUserBuy.setProductId(productFixed.getProductId());
					siteUserBuy.setPayType(Constants.PAY_TYPE_5);
					siteUserBuy.setApplyTime(new Date());
					siteUserBuy.setApplyDate(HJBUT.getCurrentDate());
					siteUserBuy.setStatus(Constants.COMMON_STATUS_0);
					siteUserBuy.setTerminalType(Constants.TERMINAL_TYPE_5);
					siteUserBuy.setRate(rate);
					siteUserBuy.setProductType(Constants.PRODUCT_TYPE_2);
					siteUserBuy.setReturnType(Constants.RETURN_TYPE_22);
					siteUserBuy.setInterestDate(HJBUT.currentDate());
					siteUserBuy.setCashReturnDate(HJBUT.currentDate(productFixed.getProductTime()));
					siteUserBuy.setChangeNo(userFixed.getOrderNo());
					siteUserBuyService.insertSiteUserBuy(siteUserBuy);
					
					String info = product.getProductName()+"到期回款资金投资"+productFixed.getProductName()+"（项目本金"+amount+"、项目利息"+expectInterest+"、平台加息"+expectAddInterest
							+"、加息券收益"+expectCoupon+"、红包返现金额"+expectTip+"）";
					
					SiteUserAccountLog userAccountLog = new SiteUserAccountLog();
					userAccountLog.setUserId(userFixed.getUserId());
					userAccountLog.setAcctType(Constants.ACCOUNT_LOG_TYPE_5);
					userAccountLog.setCreateTime(new Date());
					userAccountLog.setInAccount(userFixed.getUserId());
					userAccountLog.setOutAccount(userFixed.getUserId());
					userAccountLog.setAmount(totalAmount);
					userAccountLog.setStatus(Constants.COMMON_STATUS_1);
					userAccountLog.setOrderId(orderNo);
					userAccountLog.setCurrnetOrder(null);
					userAccountLog.setFixedOrder(userFixed.getOrderNo());
					userAccountLog.setInfo(info);
					userAccountLog.setInMsg("定期");
					userAccountLog.setOutMsg("定期");
					siteUserAccountLogMapper.insertSelective(userAccountLog);
					
					//系统定期账户10003更新
					inMsg = "定期本金回款复投:"+amount+",回款定期order_id："+userFixed.getOrderNo()+"，复投定期28天："+orderNo+",复投金额："+totalAmount;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10003, totalAmount.negate(), BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_5, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10003,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
					
					//生成定期订单
					SiteUserRecharge userRecharge = new SiteUserRecharge();
					userRecharge.setUserId(userFixed.getUserId());
					userRecharge.setOrderId(siteUserBuy.getOrderNo());
					userRecharge.setStatus(Constants.COMMON_STATUS_2);
					userRecharge.setRetMsgConf("定期转定期支付成功！");
					userRecharge.setReplyTime(new Date());
					
					//支付成功，处理订单
					siteUserBuyService.rechargeNotify(userRecharge);
				}
				
				//回款到活期
				if(userFixed.getReturnType().equals(Constants.RETURN_TYPE_10)){
					//更新定期信息
					Map<String,Object> params = new HashMap<String, Object>();
					params.put("userId", userFixed.getUserId());
					params.put("totalAmount", totalAmount);
					params.put("amount", amount);
					params.put("expectInterest", expectInterest);
					params.put("expectAddInterest", expectAddInterest);
					params.put("expectCoupon", expectCoupon);
					params.put("expectTip", expectTip);
					params.put("totalIncome", totalIncome);
					params.put("frozenAccount", BigDecimal.ZERO);
					siteUserAccountMapper.updateAccountByFixed(params);
					
					Product productCurrent = new Product();
					productCurrent.setType(Constants.PRODUCT_TYPE_1);
					productCurrent.setStauts(1);
					productCurrent = productMapper.selectOne(productCurrent);
					
					BigDecimal rate = productCurrent.getRate();
					if(productCurrent.getAddRate() != null){
						rate = rate.add(productCurrent.getAddRate());
					}
					
					//保存订单
					SiteUserBuy siteUserBuy = new SiteUserBuy();
					siteUserBuy.setOrderNo(orderNo);
					siteUserBuy.setUserId(userFixed.getUserId());
					siteUserBuy.setAmount(totalAmount);
					siteUserBuy.setProductId(productCurrent.getProductId());
					siteUserBuy.setPayType(Constants.PAY_TYPE_3);
					siteUserBuy.setApplyTime(new Date());
					siteUserBuy.setApplyDate(HJBUT.getCurrentDate());
					siteUserBuy.setStatus(Constants.COMMON_STATUS_0);
					siteUserBuy.setTerminalType(Constants.TERMINAL_TYPE_5);
					siteUserBuy.setRate(rate);
					siteUserBuy.setProductType(Constants.PRODUCT_TYPE_1);
					siteUserBuy.setInterestDate(HJBUT.currentDate());
					siteUserBuy.setCashReturnDate(HJBUT.currentDate(1));
					siteUserBuy.setChangeNo(userFixed.getOrderNo());
					siteUserBuyService.insertSiteUserBuy(siteUserBuy);
					
					String info = product.getProductName()+"到期回款资金投资"+productCurrent.getProductName()+"（项目本金"+amount+"、项目利息"+expectInterest+"、平台加息"+expectAddInterest
							+"、加息券收益"+expectCoupon+"、红包返现金额"+expectTip+"）";
					
					SiteUserAccountLog userAccountLog = new SiteUserAccountLog();
					userAccountLog.setUserId(userFixed.getUserId());
					userAccountLog.setAcctType(Constants.ACCOUNT_LOG_TYPE_5);
					userAccountLog.setCreateTime(new Date());
					userAccountLog.setInAccount(userFixed.getUserId());
					userAccountLog.setOutAccount(userFixed.getUserId());
					userAccountLog.setAmount(totalAmount);
					userAccountLog.setStatus(Constants.COMMON_STATUS_1);
					userAccountLog.setOrderId(orderNo);
					userAccountLog.setCurrnetOrder(null);
					userAccountLog.setFixedOrder(userFixed.getOrderNo());
					userAccountLog.setInfo(info);
					userAccountLog.setInMsg("活期");
					userAccountLog.setOutMsg("定期");
					siteUserAccountLogMapper.insertSelective(userAccountLog);
					
					//更新系统活期账户
					inMsg = "定期本金回款复投:"+amount+",回款定期order_id："+userFixed.getOrderNo()+"，复投活期："+orderNo+",复投金额："+totalAmount;;
					log.info(inMsg);
					siteSysAccountService.updateBanlanceByUserId(Constants.SYS_ACCOUNT_10002, totalAmount.negate(), BigDecimal.ZERO, Constants.ACCOUNT_LOG_TYPE_5, 
							userFixed.getUserId(), Constants.SYS_ACCOUNT_10002,
							"", "", userFixed.getOrderNo(), desc, inMsg, inMsg);
					
					//生成活期订单
					SiteUserRecharge userRecharge = new SiteUserRecharge();
					userRecharge.setUserId(userFixed.getUserId());
					userRecharge.setOrderId(siteUserBuy.getOrderNo());
					userRecharge.setStatus(Constants.COMMON_STATUS_2);
					userRecharge.setRetMsgConf("定期转活期支付成功！");
					userRecharge.setReplyTime(new Date());
					
					//支付成功，处理订单
					siteUserBuyService.rechargeNotify(userRecharge);
					//转入活期持有
//					params = new HashMap<String, Object>();
//					params.put("userId", userFixed.getUserId());
//					params.put("amount", totalAmount.negate());
//					siteUserAccountMapper.updateCurrentBalance(params);
				}
				
				//回款到银行卡
				if(userFixed.getReturnType().equals(Constants.RETURN_TYPE_99)){
					
					//更新定期信息
					Map<String,Object> params = new HashMap<String, Object>();
					params.put("userId", userFixed.getUserId());
					params.put("totalAmount", totalAmount);
					params.put("amount", amount);
					params.put("expectInterest", expectInterest);
					params.put("expectAddInterest", expectAddInterest);
					params.put("expectCoupon", expectCoupon);
					params.put("expectTip", expectTip);
					params.put("totalIncome", totalIncome);
					params.put("frozenAccount", totalAmount);
					siteUserAccountMapper.updateAccountByFixed(params);
					
					String info = product.getProductName()+"到期回款（项目本金"+amount+"、项目利息"+expectInterest+"、平台加息"+expectAddInterest
							+"、加息券收益"+expectCoupon+"、红包返现金额"+expectTip+"）";
					
					String bankMsg = siteUserBankcardService.queryBankInfobyUserId(userFixed.getUserId());
					String inMsgn = "用户银行卡（"+bankMsg+"）";
					//记录日志
					SiteUserAccountLog userAccountLog = new SiteUserAccountLog();
					userAccountLog.setUserId(userFixed.getUserId());
					userAccountLog.setAcctType(Constants.ACCOUNT_LOG_TYPE_2);
					userAccountLog.setCreateTime(new Date());
					userAccountLog.setInAccount(userFixed.getUserId());
					userAccountLog.setOutAccount(userFixed.getUserId());
					userAccountLog.setAmount(totalAmount);
					userAccountLog.setStatus(Constants.COMMON_STATUS_3);
					userAccountLog.setOrderId(orderNo);
					userAccountLog.setCurrnetOrder(null);
					userAccountLog.setFixedOrder(userFixed.getOrderNo());
					userAccountLog.setInfo(info);
					userAccountLog.setInMsg(inMsgn);
					userAccountLog.setOutMsg("定期");
					
					siteUserAccountLogMapper.insertSelective(userAccountLog);
					
					//计算预计计息日、利息到账日
					List<String> holidayList = holidayService.queryHolidayList();
					
					String nextDay = TradeDateUtil.getDayExceptWeekend(HJBUT.currentDate(1));
					nextDay = TradeDateUtil.getDayAfterHoliday(nextDay, holidayList);
					
					PayCashWithdraw payWithdram = new PayCashWithdraw();
					payWithdram.setOrderId(orderNo);
					payWithdram.setTerminalType(Constants.TERMINAL_TYPE_5);
					payWithdram.setAmount(totalAmount);
					payWithdram.setUserFee(BigDecimal.ZERO);
					payWithdram.setUserId(userFixed.getUserId());
					payWithdram.setStatus(Constants.COMMON_STATUS_0);
					payWithdram.setSettleDate(HJBUT.getCurrentDate(nextDay,0));
					payWithdram.setProductId(userFixed.getProductId());
					payWithdram.setApplyDate(HJBUT.getCurrentDate());
					payWithdram.setApplyTime(new Date());
					payWithdram.setCheckStatus(Constants.COMMON_STATUS_0);
					payWithdram.setSettleTime(null);
					payCashWithdrawMapper.insertSelective(payWithdram);
				}
			}
			
			log.info("定期到期处理任务结束：........................"+HJBUT.currentTime());
		} catch (Exception e) {
			log.info("定期到期处理任务异常：........................"+HJBUT.currentTime());
		}
	}
	

}
